//
//  JQFYCreatGroupModel.m
//  JQFY
//
//  Created by jack on 2017/10/9.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import "JQFYCreatGroupModel.h"

@implementation JQFYCreatGroupModel

+ (nullable NSDictionary<NSString *, id> *)modelContainerPropertyGenericClass {
    return @{@"constraints": [JQFYImageModel class]};
}

- (NSArray<JQFYImageModel *> *)constraints {
    if (_constraints.count < 3) {
        return @[[JQFYImageModel yy_modelWithJSON:@{@"image": @"creatGroup_peopleNum1",
                                                    @"selectImage": @"creatGroup_selecte_peopleNum1",
                                                    @"maxCount": @"50"}],
                 [JQFYImageModel yy_modelWithJSON:@{@"image": @"creatGroup_peopleNum2",
                                                    @"selectImage": @"creatGroup_selecte_peopleNum2",
                                                    @"maxCount": @"100"}],
                 [JQFYImageModel yy_modelWithJSON:@{@"image": @"creatGroup_peopleNum3",
                                                    @"selectImage": @"creatGroup_selecte_peopleNum3",
                                                    @"maxCount": @"500"}]];
    }
    return  _constraints;
}

- (JQFYFlockInfoModel *)flockInfo {
    return [JQFYFlockInfoModel yy_modelWithJSON:@{
                                                  @"icon": @{
                                                          @"image": @"creatGroup_icon"
                                                          }
                                                  }];
}

- (NSString *)address {
    if (_address.length == 0) {
        return @"2017UNINHIBITED NIGHT 上海站";
    }
    return _address;
}

- (UIImage *)coverImage {
    if (_coverImage == nil) {
        return [UIImage imageNamed:@"creatGroup_cover"];
    }
    return _coverImage;
}

@end
